package com.zrrd.reggie.common;

public class BaseContext {

    //创建保存线程对象的变量
    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    //设置值
    public static void setCurrentId(long id) {
        threadLocal.set(id);
    }

    //
    public static long getCurrentId() {
        return threadLocal.get();
    }
}
